VxSetLeftOffsets


Set the left offset of right-aligned widgets

Syntax

VxSetLeftOffsets widgets [MotifOffset] [CHARMOffset]

Description

Given a list of widgets which have been created with -alignRight relative to the previous Label, sets the left offset of the first widget so that all the Labels fit on the Form.

Parameters

widgets
Specifies a list of widgets; the first widget in the list is the one that gets modified.

MOTIFOffset
Specifies the graphical environment leftOffset possessed by the first widget, which must be taken into account. (This is optional; the default is 0.)

CHARMOffset
Specifies the character mode leftOffset possessed by the first widget, which must be taken into account. (This is optional; the default is 0.)

Example

The following code illustrates the use of VxSetLeftOffsets.

set app [VtOpen demo]

set fn [VtFormDialog $app.fn -title "VxSetLeftOffsets Demo" ]

set but1 [VtPushButton $fn.but1 -label "Kumquat"]

set but2 [VtPushButton $fn.but2 \
	-alignRight $but1 \
	-label "Grapefruit"]

list widgetlist
lappend widgetlist $but1
lappend widgetlist $but2

VxSetLeftOffsets $widgetlist

VtShow $fn
VtMainLoop

This code produces the following: